<%--
  Created by IntelliJ IDEA.
  User: cjrh2
  Date: 2025/9/19
  Time: 20:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.6.0.min.js"></script>
</head>
<body>

<table>

    <form action="/mvc/order" method="post">
        <input type="hidden" name="_method" value="put">
        <input type="hidden" name="id" value="${order.id}">
        <tr>
            <td>name</td>
            <td><input type="text" id="name" name="name" value="${order.name}"></td>
        </tr>

        <tr>
            <td>totalprice</td>
            <td><input type="number" id="totalprice" name="totalprice" value="${order.totalprice}"></td>
        </tr>

        <tr>
            <td>ordertime</td>
            <td><input type="text" value="${order.ordertime}" id="ordertime" name="ordertime"></td>
        </tr>

        <tr>
            <td>status</td>
            <td>
                <c:if test="${order.status == 1}">
                    <input type="radio" name="status" value="1" checked="checked">已支付
                    <input type="radio" name="status" value="0">未支付
                </c:if>

                <c:if test="${order.status == 0}">
                    <input type="radio" name="status" value="1">已支付
                    <input type="radio" name="status" value="0" checked="checked">未支付
                </c:if>
            </td>
        </tr>

        <tr>
            <td>
                <input type="submit" value="update"><br>
            </td>
        </tr>

    </form>


</table>


</body>
</html>
